home *** CD-ROM | disk | FTP | other *** search
/ Champak 64 / Volume 64 - JOGO DISK .iso / Games / skecthpad.swf / scripts / frame_35 / PlaceObject2_428_121 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-04-25  |  4KB  |  161 lines

  1. onClipEvent(enterFrame){
  2.    this.gotoAndStop(_root.activeitem);
  3.    if(_root._ymouse <= 110 + _root.setthickness * 2)
  4.    {
  5.       lining = false;
  6.       _root.temporaryliner.removeMovieClip();
  7.       drawing = false;
  8.       ereasing = false;
  9.       circelling = false;
  10.       squaring = false;
  11.       fillsquaring = false;
  12.       if(_root.cursr._alpha < 100)
  13.       {
  14.          _root.cursr._alpha += 10;
  15.       }
  16.       if(_alpha > 0)
  17.       {
  18.          _alpha = _alpha - 10;
  19.       }
  20.    }
  21.    else if(_root._ymouse >= 440 - _root.setthickness * 2)
  22.    {
  23.       lining = false;
  24.       _root.temporaryliner.removeMovieClip();
  25.       drawing = false;
  26.       ereasing = false;
  27.       circelling = false;
  28.       squaring = false;
  29.       fillsquaring = false;
  30.       if(_root.cursr._alpha < 100)
  31.       {
  32.          _root.cursr._alpha += 10;
  33.       }
  34.       if(_alpha > 0)
  35.       {
  36.          _alpha = _alpha - 10;
  37.       }
  38.    }
  39.    else if(_root._xmouse <= 130 + _root.setthickness * 2)
  40.    {
  41.       lining = false;
  42.       _root.temporaryliner.removeMovieClip();
  43.       drawing = false;
  44.       ereasing = false;
  45.       circelling = false;
  46.       squaring = false;
  47.       fillsquaring = false;
  48.       if(_root.cursr._alpha < 100)
  49.       {
  50.          _root.cursr._alpha += 10;
  51.       }
  52.       if(_alpha > 0)
  53.       {
  54.          _alpha = _alpha - 10;
  55.       }
  56.    }
  57.    else if(_root._xmouse >= 680 - _root.setthickness * 2)
  58.    {
  59.       lining = false;
  60.       _root.temporaryliner.removeMovieClip();
  61.       drawing = false;
  62.       ereasing = false;
  63.       circelling = false;
  64.       squaring = false;
  65.       fillsquaring = false;
  66.       if(_root.cursr._alpha < 100)
  67.       {
  68.          _root.cursr._alpha += 10;
  69.       }
  70.       if(_alpha > 0)
  71.       {
  72.          _alpha = _alpha - 10;
  73.       }
  74.    }
  75.    else
  76.    {
  77.       if(_root.cursr._alpha > 0)
  78.       {
  79.          _root.cursr._alpha -= 10;
  80.       }
  81.       if(_alpha < 100)
  82.       {
  83.          _alpha = _alpha + 10;
  84.       }
  85.    }
  86.    Mouse.hide();
  87.    _X = _root._xmouse;
  88.    _Y = _root._ymouse;
  89.    if(drawing == true)
  90.    {
  91.       with(_root["drawline" + symbolnumber])
  92.       {
  93.          lineStyle(_root.setthickness,_root.setcolor,_root.setopacity);
  94.          lineTo(_root.pencil._x,_root.pencil._y);
  95.       }
  96.    }
  97.    if(ereasing == true)
  98.    {
  99.       with(_root["drawline" + symbolnumber])
  100.       {
  101.          lineStyle(_root.setthickness * 4,16711160,100);
  102.          lineTo(_root.pencil._x,_root.pencil._y);
  103.       }
  104.    }
  105.    if(lining == true)
  106.    {
  107.       _root.createEmptyMovieClip("temporaryliner",symbolnumber);
  108.       with(_root.temporaryliner)
  109.       {
  110.          moveTo(_root.pencil.start_line_x,_root.pencil.start_line_y);
  111.          lineStyle(_root.setthickness,_root.setcolor,_root.setopacity);
  112.          lineTo(_root.pencil._x,_root.pencil._y);
  113.       }
  114.    }
  115.    if(squaring == true)
  116.    {
  117.       _root.createEmptyMovieClip("temporarysquare",symbolnumber);
  118.       with(_root.temporarysquare)
  119.       {
  120.          moveTo(_root.pencil.start_line_x,_root.pencil.start_line_y);
  121.          lineStyle(_root.setthickness,_root.setcolor,_root.setopacity);
  122.          lineTo(_root.pencil._x,_root.pencil.start_line_y);
  123.          lineTo(_root.pencil._x,_root.pencil._y);
  124.          lineTo(_root.pencil.start_line_x,_root.pencil._y);
  125.          lineTo(_root.pencil.start_line_x,_root.pencil.start_line_y);
  126.       }
  127.    }
  128.    if(fillsquaring == true)
  129.    {
  130.       _root.createEmptyMovieClip("temporarysquare",symbolnumber);
  131.       with(_root.temporarysquare)
  132.       {
  133.          moveTo(_root.pencil.start_line_x,_root.pencil.start_line_y);
  134.          beginFill(_root.setcolor,_root.setopacity);
  135.          lineStyle(1,0,0);
  136.          lineTo(_root.pencil._x,_root.pencil.start_line_y);
  137.          lineTo(_root.pencil._x,_root.pencil._y);
  138.          lineTo(_root.pencil.start_line_x,_root.pencil._y);
  139.          lineTo(_root.pencil.start_line_x,_root.pencil.start_line_y);
  140.          endFill();
  141.       }
  142.    }
  143.    if(drawing == false)
  144.    {
  145.       if(Key.isDown(17) && Key.isDown(90) && undocounter == 0)
  146.       {
  147.          symbolnumber--;
  148.          _root["drawline" + symbolnumber].removeMovieClip();
  149.          undocounter = 10;
  150.       }
  151.       if(undocounter > 0)
  152.       {
  153.          undocounter--;
  154.       }
  155.    }
  156.    if(symbolnumber < 1)
  157.    {
  158.       symbolnumber = 1;
  159.    }
  160. }
  161.